package com.woniuxy.orderfeign.configuration;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.Configuration;

/**
 * @author: 15489  <br/>
 * Date: 2022/3/28:11:13  <br/>
 * Description: 负载均衡
 */
//配置类指定是 轮询还是权重
@Configuration
@RibbonClient(name = "goods",configuration = RandomRule.class)
public class RibbonCinfiguration {

//    public IRule rule(){
//        return  new RandomRule();
//    }
}
